import { http } from "@/utils/http";

export const GetAgentPerformance = (
	data: Eps.AgentService.GetAgentPerformance_Params = {}
): Promise<Eps.AgentService.GetAgentPerformance> => {
	return http.post(`/AgentService/GetAgentPerformance`, Object.values(data));
};

export const GetAgentUsers = (
	data: Eps.AgentService.GetAgentUsers_Params = {}
): Promise<Eps.AgentService.GetAgentUsers> => {
	return http.post(`/AgentService/GetAgentUsers`, Object.values(data));
};

export const GetCommissions = (
	data: Eps.AgentService.GetCommissions_Params = {}
): Promise<Eps.AgentService.GetCommissions> => {
	return http.post(`/AgentService/GetCommissions`, Object.values(data));
};

export const GetMyCommissionRate = (
	data: Eps.AgentService.GetMyCommissionRate_Params = {}
): Promise<Eps.AgentService.GetMyCommissionRate> => {
	return http.post(`/AgentService/GetMyCommissionRate`, Object.values(data));
};

export const SetInviteCommissionRate = (
	data: Eps.AgentService.SetInviteCommissionRate_Params = {}
): Promise<Eps.AgentService.SetInviteCommissionRate> => {
	return http.post(`/AgentService/SetInviteCommissionRate`, Object.values(data));
};

export const SetMultiSellCommissionRate = (
	data: Eps.AgentService.SetMultiSellCommissionRate_Params = {}
): Promise<Eps.AgentService.SetMultiSellCommissionRate> => {
	return http.post(`/AgentService/SetMultiSellCommissionRate`, Object.values(data));
};

export const SetUserBeAgent = (
	data: Eps.AgentService.SetUserBeAgent_Params = {}
): Promise<Eps.AgentService.SetUserBeAgent> => {
	return http.post(`/AgentService/SetUserBeAgent`, Object.values(data));
};
